<%-- 
    Document   : userOrderDetail
    Created on : Jul 5, 2012, 3:07:47 PM
    Author     : Owner
--%>

<%@include file="/jsp/top.jsp"%>

<html>
    <head>        
        <title>Order Details</title>
    </head>
    <body>
        <div class="clear"></div>
        <table cellspacing="5px" width="100%" align="center">
            <tr>
                <td>
                    <table cellspacing="5px" width="100%" align="center">
                        <tr>
                            <td style="vertical-align: top;" width="20%">
                                <%if (Long.parseLong(String.valueOf(session.getAttribute("loginUserId"))) > 0 && Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 1) {%>
                                <div class="box-left box-menu">
                                    <div class="block block-account">
                                        <div class="block-title">
                                            <strong>
                                                <span>My Account</span>
                                            </strong>
                                        </div>
                                        <div class="block-content">
                                            <ul>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">Account Dashboard</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showEditUserPersonalInfo&changePassword='N'">Account Information</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showManageAddress">Manage Address</a></li>
                                                <li><a class="show-dashboard" href="./payment.do?action=showUserOrders">My Orders</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">My Wishlists</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showNewsletter">Newsletter Subscription</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <%} else if (Long.parseLong(String.valueOf(session.getAttribute("loginUserId"))) > 0 && Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 2) {%>
                                <%@include file="/jsp/right.jsp"%>
                                <%}%>
                            </td>
                            <td style="vertical-align: top;" width="80%">
                                <div class="page-title"><h1>Order Details</h1></div>
                                <table align="center" border="1" cellspacing="10px" width="100%">
                                    <tr>
                                        <td>
                                            <table align="center" cellspacing="10px" width="100%">
                                                <tr>
                                                    <td><strong>Order No</strong>
                                                    </td>
                                                    <td><strong>Order Date</strong>
                                                    </td>
                                                    <td><strong>Order Status</strong>
                                                    </td>
                                                    <td><strong>Payment Mode</strong>
                                                    </td>
                                                </tr>
                                                <logic:present name="orderDetail" scope="request">
                                                    <tr>
                                                        <td><bean:write name="orderDetail" property="orderId"/></td>
                                                        <td><bean:write name="orderDetail" property="orderDate"/></td>
                                                        <td><bean:write name="orderDetail" property="orderStatus"/></td>
                                                        <td><bean:write name="orderDetail" property="paymentType"/></td>
                                                    </tr>
                                                </logic:present>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Products In Your Order
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table align="center" cellspacing="10px" width="100%">
                                                <tr>
                                                    <td><strong>Sr. No</strong></td>
                                                    <td><strong>Product Name</strong></td>
                                                    <td><strong>Quantity</strong></td>
                                                    <td><strong>Sub Total</strong></td>
                                                </tr>
                                                <logic:notPresent name="productCartList" scope="request">
                                                    <tr>
                                                        <td>
                                                            No products found in your order
                                                        </td>
                                                    </tr>
                                                </logic:notPresent>
                                                <logic:present name="productCartList" scope="request">
                                                    <logic:empty name="productCartList" scope="request">
                                                        <tr>
                                                            <td>
                                                                No products found in your order
                                                            </td>
                                                        </tr>
                                                    </logic:empty>
                                                    <logic:notEmpty name="productCartList" scope="request">
                                                        <%int i = 0;%>
                                                        <logic:iterate id="cartProducts" name="productCartList" scope="request">
                                                            <%i++;%>
                                                            <tr>
                                                                <td><%=i%></td>
                                                                <td> <a href="./product.do?action=showProductDetails&productId=<bean:write name="cartProducts" property="productId"/>&productName=<bean:write name="cartProducts" property="productName"/>">
                                                                        <bean:write name="cartProducts" property="productName"/></a>
                                                                </td>
                                                                <td><bean:write name="cartProducts" property="addToCartQty"/></td>
                                                                <td>Rs. <bean:write name="cartProducts" property="productSubTotal"/></td>
                                                            </tr>
                                                        </logic:iterate>
                                                    </logic:notEmpty>
                                                </logic:present>
                                                <logic:present name="orderPayment" scope="request">
                                                    <tr>
                                                        <td align="right" colspan="4">
                                                            <ul style="text-align: right;">
                                                                <li>
                                                                    Total Item:<bean:write name="orderPayment" property="totalItem"/>
                                                                </li>
                                                                <li>
                                                                    Sub Total: &nbsp; Rs.<bean:write name="orderPayment" property="paydelSubTotal" />
                                                                </li>
                                                                <li>
                                                                    Shipping Cost :&nbsp; Rs.<bean:write name="orderPayment" property="shippingCost"/>
                                                                </li>
                                                                <li>
                                                                    Total :&nbsp; Rs.<bean:write name="orderPayment" property="paydelTotal"/>
                                                                </li>
                                                            </ul>
                                                        </td>
                                                    </tr>
                                                </logic:present>
                                            </table>
                                        </td>
                                    </tr>

                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td><%@include file="/jsp/footer.jsp" %></td>
            </tr>
        </table>
    </body>
</html>
